﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="NhomSanPham.aspx.cs" Inherits="Web.NhomSanPham" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div class="list-product">
<div class="header-listproduct">
<h3><asp:Label ID="lbltitle" runat="server" /></h3>
</div>
<div class="content-listproduct">
    <asp:DataList ID="listproduct" runat="server" RepeatColumns="3" Width="100%" 
        RepeatDirection="Horizontal" DataSourceID="SqlDataSource1" >
        <ItemTemplate>
            <div class="product">
                <div class="imgproduct">
                    <asp:Image  CssClass="img" ID="Image1" ImageUrl='<%#Eval("Image") %>'  Width="134px" Height="193px" runat="server" />
                </div>
                
                <asp:HyperLink ID="HyperLink1" runat="server" CssClass="nameproduct" 
                    NavigateUrl='<%# Eval("ID","~/ChiTietSanPham.aspx?pid={0}") %>' 
                    Text='<%# Eval("Name") %>'></asp:HyperLink>
                <asp:Label CssClass="priceproduct" ID="Label2" Text='<%#Format_Price(Eval("Price").ToString()) %>' runat="server" />
            </div>
        </ItemTemplate>
    
    </asp:DataList>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT * FROM [Product] WHERE ([GroupProduct_Id] = @GroupProduct_Id)">
        <SelectParameters>
            <asp:QueryStringParameter Name="GroupProduct_Id" QueryStringField="gid" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>

</div>
   
</div>

</asp:Content>
